package designmode.absfactory;

/**
 * 工厂模式--客户端调用工厂，工厂内部实现生产者各种业务
 */
public class OrderPizza {
    AbsFactory absFactory;
    public OrderPizza(AbsFactory absFactory){
        this.absFactory=absFactory;
    }
    public void doUse(){
        absFactory.createPizza();
    }

    public static void main(String[] args) {
        OrderPizza s = new OrderPizza(new BJFactory("BJCheessPizza"));
        s.doUse();
    }
}
